package com.chen.Main;

import com.chen.pojo.Hello;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainHello1 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Hello hello1 = (Hello) context.getBean("hello1");
        hello1.setMessage("加油");
        hello1.getMessage();
        System.out.println("=======");
        Hello hello11 = (Hello) context.getBean("hello1");
        hello11.getMessage();
    }
}
